<?php
一：安装
1.1：下载
    https://www.djangoproject.com/download/
1.2：安装
    python setup.py install
1.3：查看版本
    python
    import django
    django.get_version()



./configure --enable-shared --with-python=/usr/bin/python2.7

./configure --with-apxs=/usr/local/httpd/bin/apxs --with-python=/usr/bin/python2.7


chmod 755 /usr/local/httpd/modules/mod_wsgi.so

LoadModule wsgi_module modules/mod_wsgi.so

~]# which apxs
/usr/local/httpd/bin/apxs






https://pypi.python.org/pypi/MySQL-python



   tar xfz MySQL-python-1.2.1.tar.gz
   cd MySQL-python-1.2.1
   # edit site.cfg if necessary
   python setup.py build
   python setup.py install



build/lib.linux-x86_64-2.7/_mysql.so


/web/python/service-platform-member/tdrenmange

        WSGIScriptAlias / /web/python/service-platform-member/tdrenmange/tdrenmange/wsgi.py
        WSGIPythonPath /web/python/service-platform-member/tdrenmange

        Alias /static /web/python/service-platform-member/tdrenmange/collected_static
        <Directory /web/python/service-platform-member/tdrenmange/collected_static>
            Require all granted
        </Directory>

        <Directory /web/python/service-platform-member/tdrenmange/tdrenmange>
            <Files wsgi.py>
                Require all granted
            </Files>
        </Directory>



        r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
    >>> r.status_code
    200



yum -y install uwsgi

 uwsgi -s :9090 -w tdrenmange 

 >>> import urllib2
>>> dir(urllib2)

